﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace lcps.Web.projectinfo
{
    public partial class Show : Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int ID = (Convert.ToInt32(strid));
                    ShowInfo(ID);
                }
            }
        }

        private void ShowInfo(int ID)
        {
            lcps.BLL.projectinfo bll = new lcps.BLL.projectinfo();
            lcps.Model.projectinfo model = bll.GetModel(ID);
            this.lblID.Text = model.ID.ToString();
            this.lblbidid.Text = model.bidid;
            this.lblpurchaseid.Text = model.purchaseid;
            this.lblusework.Text = model.usework;
            this.lblprojectname.Text = model.projectname;
            this.lblprojecttype.Text = model.projecttype;
            this.lblsupplier.Text = model.supplier;
            this.lblmateriel.Text = model.materiel;
            this.lblunit.Text = model.unit;
            this.lblnums.Text = model.nums.ToString();
            this.lbldeliverydate.Text = model.deliverydate.ToString();
            this.lblarrivaldate.Text = model.arrivaldate.ToString();
            this.lblworkdate.Text = model.workdate.ToString();
            this.lbldrawingplandate.Text = model.drawingplandate.ToString();
            this.lbldrawingstate.Text = model.drawingstate;
            this.lbldrawingsubmitdate.Text = model.drawingsubmitdate.ToString();
            this.lbldrawingconfirmdate.Text = model.drawingconfirmdate.ToString();
            this.lbldesignstate.Text = model.designstate;
            this.lblmajormaterielpurchase.Text = model.majormaterielpurchase;
            this.lbldeviceproductionstate.Text = model.deviceproductionstate;
            this.lblmothstate.Text = model.mothstate;
            this.lblnextmoth.Text = model.nextmoth;
            this.lblplanarrivedate.Text = model.planarrivedate.ToString();
            this.lblcoordinate.Text = model.coordinate;
            this.lblremark.Text = model.remark;
            this.lblproid.Text = model.proid;
            this.lblrealdate.Text = model.realdate.ToString();
            this.lblreceivedname.Text = model.receivedname;
            this.lblreceivedphone.Text = model.receivedphone;
            this.lblsuppliername.Text = model.suppliername;
            this.lblsupplierphone.Text = model.supplierphone;
            //this.lblcheckstate.Text = model.checkstate;
            //this.lbltransactdate.Text = model.transactdate.ToString();
            //this.lblagent.Text = model.agent;
            //this.lbltableid.Text = model.tableid.ToString();

            lcps.Model.tableinfo tab = new lcps.BLL.tableinfo().GetModel(model.tableid.Value);

            this.lbltablename.Text = tab.tablename;

        }


    }
}
